/*
 * @Author: 徐建辰
 * @Date: 2022-04-15 15:33:51
 * @LastEditTime: 2022-04-15 15:33:51
 * @LastEditors: 徐建辰
 * @Description: 获取全局app实例对象
 */
import {getCurrentInstance} from 'vue'
import {ElMessageBox} from 'element-plus'

export default function useGlobalProperties() {
  const {appContext: {app: {config: {globalProperties}}}} = getCurrentInstance()

  function confirm(title, options) {
    return ElMessageBox.confirm(title, options)
  }

  return {...globalProperties, confirm}
}